<!--过期红包-->
<template>
  <div class="my_a_bhistory_c">
    <div class="redenvelopesH" v-for="(item, index) in listshbs" :key="index">
      <div class="list_item" id="only">
        <div class="list_item_div1">
          <span class="list_item_div1_span1">￥</span>
          <span class="list_item_div1_span2">{{ listshbs[index].amount }}</span>
          <span class="list_item_div1_span3">.</span>
          <span class="list_item_div1_span4">0</span>
          <p class="list_item_div1_p">
            {{ listshbs[index].description_map.sum_condition }}
          </p>
        </div>
        <div class="list_item_div2">
          <div class="list_item_div2_div">{{ listshbs[index].name }}</div>
          <p class="list_item_div2_p1">
            {{ listshbs[index].description_map.validity_periods }}
          </p>
          <p class="list_item_div2_p2">
            {{ listshbs[index].description_map.phone }}
          </p>
        </div>
      </div>
      <div class="list_item_footer">
        <p class="list_item_footer_p">
          {{ listshbs[index].limit_map.restaurant_flavor_ids}}
        </p>
      </div>
      <div class="expired">
        <i class="iconfont icon-yiguoqi expired_i"></i>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "My_A_Bhistory_C",
  data: function () {
    return {
      listshbs: [],
    };
  },
  created() {
    this.$axios(
      "https://elm.cangdu.org/promotion/v2/users/1/expired_hongbaos?limit=20&offset=0"
    )
      .then((res) => {
        console.log(res);
        for (var i = 0; i < res.length; i++) {
          if (res[i].limit_map == undefined) {
            res[i].limit_map = {};
            res[i].limit_map.restaurant_flavor_ids = "";
            this.listshbs = res;
          }
        }
      })
      .catch((err) => console.log(err));
  },
};
</script>

<style lang="less">
.my_a_bhistory_c {
  padding: 11.719px;
  .redenvelopesH {
    width: 351.9px;
    height: 114.85px;
    background: #fff
      url()
      repeat-x;
    background-size: 1rem 0.2rem;
    margin-bottom: 16px;
    border-radius: 5px;
    // box-sizing: border-box;
    position: relative;

    .list_item {
      margin-top: 45px;
      padding: 23.438px 11.719px 18.75px 11.719px;
      display: flex;
      justify-content: space-between;

      .list_item_div1 {
        width: 98.21px;
        height: 72.67px;
        border-right: 1px solid #999;
        color: #cccccc;

        .list_item_div1_span1 {
          font-size: 20px;
          font-weight: 900;
        }
        .list_item_div1_span2 {
          font-size: 50px;
          font-weight: 400;
        }
        .list_item_div1_span3 {
          font-size: 50px;
          font-weight: 400;
        }
        .list_item_div1_span4 {
          font-size: 20px;
          font-weight: 900;
        }
        .list_item_div1_p {
          font-size: 14px;
          color: #999;
        }
      }
      .list_item_div2 {
        .list_item_div2_div {
          color: #666;
          font-size: 16px;
        }
        .list_item_div2_p1,
        .list_item_div2_p2 {
          font-size: 12px;
          color: #999;
        }
        .list_item_div2_p2 {
          width: 211.5px;
        }
      }
    }
    .expired {
      position: absolute;
      left: 280px;
      top: 10px;

      .expired_i {
        font-size: 65px;
        color: #999;
      }
    }
    .list_item_footer {
      background-color: #f9f9f9;
      .list_item_footer_p {
        // height: 16px;
        font-size: 12px;
        line-height: 40px;
        color: #999;
        margin-left: 15px;
      }
    }
  }
}
</style>